package com.zy.sample;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

import com.zy.weather.WeatherReport;
import com.zy.weather.WeatherUtil;

public class WeatherSample {

    /**
     * 个简单的应用
     * 
     * @param args
     */
    public static void main(String[] args) {
        // 获取成都的天气预报信息
        String city = "南京";
        
        //
//        System.out.println(city + "未来7天天气预报信息：");
//        List<WeatherReport> listReport = new WeatherUtil("./weathercn.data").getWeatherReports(city);
//        if (listReport.size() < 1) {
//            System.out.println("没有找到 " + city + " 的天气预报");
//        } else {
//            for (WeatherReport report : listReport) {
//                System.out.println(report);
//            }
//        }
        Calendar cal = Calendar.getInstance();
        System.out.println(new WeatherUtil("./weathercn.xml").getWeatherReport(city, cal));
    }

}
